04. Project Demo
Project Demo
Once your environment is setup correctly and built the project, you can launch the project demo from a sourced terminal by:
$ cd ~/catkin_ws/src/RoboND-Perception-Project/pr2_robot/scripts
$ chmod u+x pr2_safe_spawner.sh
$ ./pr2_safe_spawner.sh
Once Gazebo is up and running, make sure you see the following objects in the gazebo world:
- Robot
- Table arrangement
- Three target objects on the table
- Dropboxes on either sides of the robot
On the RViz window, you should be able to see PR2 along with a preliminary collision map and a welcome message.
If there seems to be a problem with either gazebo or RViz, consider closing the demo by pressing ctrl+c in the terminal you used to launch the demo and restarting it.
If everything worked out fine, you can now begin the demo.
Just click on the Next button on the bottom left corner of the RViz window to proceed from one state to another.
Notice how a neat little status message is displayed about the simulator state on top of the robot in RViz window. This status message changes as we move through the different stages of simulation.
- The robot starts in an idle state, with both arms extended forward.
- Clicking on the Next button will add two dropboxes as collision elements.
- Next, the robot raises its arms to enter the so-called "Ready State". This allows the robot to have an unobstructed vision in front of it, evident by a growing collision map.
- Further, the robot rotates in-place, first clockwise then anti-clockwise, finally settling at the center "Ready State". This maneuver allows the robot to expand the collision map and include the side tables as well.
- Next the robot identifies three tabletop objects (marked by insertion of green object meshes) and starts planning pick and place trajectories.
- From here on, just sit back, relax and watch as the robot swiftly accomplishes the pick and place task by depositing all three items.
This signifies the completion of one pick and place operation cycle.
Note that the planning framework creates a new plan with different trajectory points every time, even though the three objects are spawned at the same location.
Play around with this demo and don't forget to have fun!